docs(claude): add Error Messages four-ingredient strategy#1254
Merged
John-David Dalton (jdalton) merged 1 commit intomainfrom Apr 22, 2026
Merged
docs(claude): add Error Messages four-ingredient strategy#1254John-David Dalton (jdalton) merged 1 commit intomainfrom
John-David Dalton (jdalton) merged 1 commit intomainfrom
Conversation
Adds the four-ingredient error-message strategy (What / Where / Saw vs. wanted / Fix) from socket-repo-template's CLAUDE.md. Keeps the existing Error handling bullet (InputError/AuthError/ CResult) and adds a new Error Messages section underneath it. Foundation for a series of follow-up PRs that fix socket-cli's existing error messages to match this strategy. No source changes in this PR — docs only.
Martin Torp (mtorp)
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an Error Messages section to
CLAUDE.mdwith the four-ingredient strategy we're using across the fleet (copied fromsocket-repo-template):Plus rules on imperative voice, naming colliding records, and not silently auto-correcting.
Why
Right now socket-cli has a lot of errors like
Invalid value for --limit: foo— true but not helpful. After this PR lands, the agent has a written rule to reach for so error messages are consistent and actionable.What's NOT in this PR
Zero source-code changes. This is just the strategy doc. The actual error-message cleanup across
src/will land in follow-up PRs split by area (commands, dlx, utils, env, test, etc.) so each PR stays reviewable.Test plan
InputError, one usesAuthError, each shows the 4 ingredients).Note
Low Risk
Docs-only change to
CLAUDE.mdwith no runtime or behavioral impact. Low risk aside from potentially influencing future error wording conventions.Overview
Adds a new
### Error Messagessection toCLAUDE.mdthat standardizes how CLI errors should be written using a four-part format (what/where/saw-vs-wanted/fix) and a few concrete rules (imperative voice, avoid vague “invalid”, name collisions explicitly, don’t silently auto-correct), with good/bad examples usingInputError/AuthError.Reviewed by Cursor Bugbot for commit 31b7466. Configure here.